package com.hua.api.modules.order.dao;

import com.hua.api.core.framework.statement.EntityManagerTemplate;
import com.hua.api.core.framework.statement.Statement;
import com.hua.api.core.framework.statement.mysql.StatementFactoryImpl;
import com.hua.api.modules.order.domain.ShopInfo;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public class ShopInfoDao extends EntityManagerTemplate {

    public List<ShopInfo> queryNeedFixedShopInfo(Date createDate){
        Statement statement = StatementFactoryImpl.getInstance().createStatement(" from ShopInfo s where s.createdTime>=?1 and s.bdLatitude is null and s.bdLongitude is null");
        statement.addParam(createDate);
        return query(statement,10, ShopInfo.class);
    }

}
